Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/improve event stream #251

Merged
merged 8 commits into from
Jul 17, 2024
Merged

Feature/improve event stream #251

merged 8 commits into from
Jul 17, 2024

Conversation

Lohann
Copy link
Collaborator

@Lohann Lohann commented Jul 15, 2024

Description

Improves the connector block stream and tx receipt finality:

  • Auto-resubscribe in case the WS connection drops
  • Guarantee that the finalized block stream increases monotonically
  • Detect forks, retracted blocks, etc.
  • SharedStream: create a single stream and share it with many listeners using tokio::sync::broadcast.
  • Use the shared stream to detect when a tx is finalized or retracted.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@Lohann
Copy link
Collaborator Author

Lohann commented Jul 15, 2024

I'm glad I leaved it running the whole night connected to Amoy... found a memory leak in the chains/ethereum/server/src/state.rs, I use it for cache the last 1024 blocks for optimize finality checks in concurrent transactions, but doesn't cleanup orphan blocks.. will disable the caching for now.

@Lohann Lohann merged commit dcab7f8 into master Jul 17, 2024
8 checks passed
@Lohann Lohann deleted the feature/improve-event-stream branch July 17, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant